package com.ym.domain.model;

import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.TableComment;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Table;


@Data
@Table
@TableComment("交易详情表")
@EqualsAndHashCode(callSuper = true)
public class FnTradeInfo extends BaseModel {

    // 交易类型
    public static final String TRADE_TYPE_PAY = "pay";
    public static final String TRADE_TYPE_REFUND = "refund";

    @Column(length = 64)
    @ColumnComment("支付宝交易号")
    private String tradeNo;

    @Column(length = 64)
    @ColumnComment("商家订单号")
    private String outTradeNo;

    @Column(length = 32)
    @ColumnComment("交易类型(支付,退款)")
    private String tradeType;

    @Column(length = 64)
    @ColumnComment("退款请求号")
    private String outRequestNo;

    @Column(length = 1024)
    @ColumnComment("请求参数")
    private String requestParam;

    @Column(length = 1024)
    @ColumnComment("响应参数")
    private String responseParam;

    @Column
    @ColumnComment("交易状态(0-交易中[默认],1-交易成功,2-交易失败)")
    private Integer tradeStatus;

}
